﻿@model MVC_登陆登出及验证.Models.RegisterViewModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>欢迎注册</title>
    <style>
        .text-danger{
            color:red;
        }
        .register{
            top:20%;
            left:40%;
            width:400px;
            height:500px;
            background-color:white;
            z-index:1002;
            position:fixed;
            text-align:center;
        }
        .shade{
            top:0%;
            left:0%;
            width:100%;
            height:100%;
              display:block;
              background-color:black;
              z-index:1001;
              opacity:.70;
              position:absolute;
        }
    </style>
</head>
<body>
    <div class="shade">

    </div>
   <div class="register">
       @using (Html.BeginForm("Register", "Account", FormMethod.Post))
       {
           @Html.AntiForgeryToken()

           <div class="form-horizontal">
               <h4>欢迎注册</h4>
               <hr />

               @Html.ValidationSummary(true, "", new { @class = "text-danger" })
               <div class="col-md-10">
                   @Html.ValidationMessageFor(model => model.UName, "", new { @class = "text-danger" })
               </div><div class="col-md-10">
                   @Html.ValidationMessageFor(model => model.RealName, "", new { @class = "text-danger" })
               </div><div class="col-md-10">
                   @Html.ValidationMessageFor(model => model.Password, "", new { @class = "text-danger" })
               </div><div class="col-md-10">
                   @Html.ValidationMessageFor(model => model.ConfirmPassword, "", new { @class = "text-danger" })
               </div><div class="col-md-10">
                   @Html.ValidationMessageFor(model => model.EMail, "", new { @class = "text-danger" })
               </div><div class="col-md-10">
                   @Html.ValidationMessageFor(model => model.Gender, "", new { @class = "text-danger" })
               </div>
               @*@Html.ValidationMessage(model)*@
               <div class="form-group">
                   @Html.LabelFor(model => model.UName, htmlAttributes: new { @class = "control-label col-md-2" })
                   <div class="col-md-10">
                       @Html.EditorFor(model => model.UName, new { htmlAttributes = new { @class = "form-control" } })
                       @*@Html.ValidationMessageFor(model => model.UName, "", new { @class = "text-danger" })*@
                   </div>
               </div>

               <div class="form-group">
                   @Html.LabelFor(model => model.RealName, htmlAttributes: new { @class = "control-label col-md-2" })
                   <div class="col-md-10">
                       @Html.EditorFor(model => model.RealName, new { htmlAttributes = new { @class = "form-control" } })
                       @*@Html.ValidationMessageFor(model => model.RealName, "", new { @class = "text-danger" })*@
                   </div>
               </div>

               <div class="form-group">
                   @Html.LabelFor(model => model.Password, htmlAttributes: new { @class = "control-label col-md-2" })
                   <div class="col-md-10">
                       @Html.EditorFor(model => model.Password, new { htmlAttributes = new { @class = "form-control" } })
                       @*@Html.ValidationMessageFor(model => model.Password, "", new { @class = "text-danger" })*@
                   </div>
               </div>

               <div class="form-group">
                   @Html.LabelFor(model => model.ConfirmPassword, htmlAttributes: new { @class = "control-label col-md-2" })
                   <div class="col-md-10">
                       @Html.EditorFor(model => model.ConfirmPassword, new { htmlAttributes = new { @class = "form-control" } })
                       @*@Html.ValidationMessageFor(model => model.ConfirmPassword, "", new { @class = "text-danger" })*@
                   </div>
               </div>

               <div class="form-group">
                   @Html.LabelFor(model => model.EMail, htmlAttributes: new { @class = "control-label col-md-2" })
                   <div class="col-md-10">
                       @Html.EditorFor(model => model.EMail, new { htmlAttributes = new { @class = "form-control" } })
                       @*@Html.ValidationMessageFor(model => model.EMail, "", new { @class = "text-danger" })*@
                   </div>
               </div>

               <div class="form-group">
                   @Html.LabelFor(model => model.Gender, htmlAttributes: new { @class = "control-label col-md-2" })
                   <div class="col-md-10">
                       @Html.Label("男", htmlAttributes: new { @class = "control-label col-md-2" })
                       @Html.RadioButtonFor(model => model.Gender, "1", new { htmlAttributes = new { @class = "form-control" } })
                       @Html.Label("女", htmlAttributes: new { @class = "control-label col-md-2" })
                       @Html.RadioButtonFor(model => model.Gender, "0", new { htmlAttributes = new { @class = "form-control" } })
                       @*@Html.ValidationMessageFor(model => model.Gender, "", new { @class = "text-danger" })*@
                   </div>
               </div>

               <div class="form-group">
                   <div class="col-md-offset-2 col-md-10">
                       <input type="submit" value="欢迎注册" class="btn btn-default" />
                   </div>
               </div>
           </div>
       }
   </div>

    <div>
        @*  @Html.ActionLink("Back to List", "Index")*@
    </div>
</body>
</html>
@*@using (Html.BeginForm("RegisterViewBPor", "Account", FormMethod.Post, new { @class = "layui-form", role = "form" }))
    {
        @Html.AntiForgeryToken()

        <hr />
                @Html.ValidationSummary("", new { @class = "text-danger" })
                <div class="layui-form-item">
                    @Html.LabelFor(m => m.UName, new { @class = "layui-form-label" })
                    <div class="layui-inline">
                        @Html.TextBoxFor(m => m.UName, new { @class = "layui-input", placeholder = "请输入用户名", autocomplete = "off" })
                    </div>
                </div>
                <div class="layui-form-item">
                    @Html.LabelFor(m => m.URealName, new { @class = "layui-form-label" })
                    <div class="layui-inline">
                        @Html.TextBoxFor(m => m.URealName, new { @class = "layui-input", placeholder = "请输入姓名", autocomplete = "off" })
                    </div>
                </div>
                <div class="layui-form-item">
                    @Html.Label("性别", new { @class = "layui-form-label", style = "float:left" })
                    @Html.Label("男", new { @class = "layui-form-label", style = " width:60px" })
                    <div style="width:50px; float:left">
                        @Html.RadioButton("gender", 1, new { style = " width:20px;height:20px;" })
                    </div>
                    @Html.Label("女", new { @class = "layui-form-label", style = " width:20px" })
                    <div style="width:50px; float:left">
                        @Html.RadioButton("gender", 0, new { style = " width:20px;height:20px", })
                    </div>
                </div>

                <div class="layui-form-item">
                    @Html.LabelFor(m => m.Password, new { @class = "layui-form-label" })
                    <div class="layui-inline">
                        @Html.TextBoxFor(m => m.Password, new { @class = "layui-input", placeholder = "请输入密码", type = "password", autocomplete = "off" })
                    </div>
                </div>
                <div class="layui-form-item">
                    @Html.LabelFor(m => m.ConfirmPassword, new { @class = "layui-form-label" })
                    <div class="layui-inline">
                        @Html.TextBoxFor(m => m.ConfirmPassword, new { @class = "layui-input", placeholder = "再次输入密码", type = "password", autocomplete = "off" })
                    </div>
                </div>*@